//
//  HYSendPicturesAndText.m
//  child
//
//  Created by lijianguomac on 13-10-7.
//  Copyright (c) 2013年 lijianguomac. All rights reserved.
//

#import "HYSendPicturesAndText.h"
#import "HYSendPicturesAndTextCell.h"

@interface HYSendPicturesAndText ()

@end

@implementation HYSendPicturesAndText


- (id)initWithStyle:(UITableViewStyle)style{
    self = [super initWithStyle:style];
    if(self){
        [self myInit];
    }
    return self;
}

- (void)myInit{
    [self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
    self.view.backgroundColor = [UIColor colorWithRed:234.0f/255.0f green:234.0f/255.0f blue:234.0f/255.0f alpha:1];
    self.tableView.backgroundColor = [UIColor colorWithRed:234.0f/255.0f green:234.0f/255.0f blue:234.0f/255.0f alpha:1];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
        if ( IOS7_OR_LATER )
        {
            self.edgesForExtendedLayout = UIRectEdgeNone;
            self.extendedLayoutIncludesOpaqueBars = NO;
            self.modalPresentationCapturesStatusBarAppearance = NO;
            
        }
#endif
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 2;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    return 250;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *Identifier = @"cell";
    HYSendPicturesAndTextCell *cell = [tableView dequeueReusableCellWithIdentifier:Identifier];
    if(!cell){
        cell = [[HYSendPicturesAndTextCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Identifier];
    }
    [cell setView:indexPath.row];
    cell.backgroundColor = [UIColor colorWithRed:234.0f/255.0f green:234.0f/255.0f blue:234.0f/255.0f alpha:1];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
//    HYGrowingUpFilesCell *cell = [self cellForTableView:tableView fromNib:self.statusCellNib];
//    NSDictionary *dic = [datas objectAtIndex:indexPath.row];
//    NSString *imageName = [dic objectForKey:@"image"];
//    NSString *title = [dic objectForKey:@"title"];
//    [cell setView:[UIImage imageNamed:imageName] title:title];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
//    NSDictionary *dic = [datas objectAtIndex:indexPath.row];
//    NSString *title = [dic objectForKey:@"title"];
//    HYGrowingUpFilesPictures *growingUpFilesPictures = [[HYGrowingUpFilesPictures alloc] initWithStyle:UITableViewStylePlain];
//    growingUpFilesPictures.title = title;
//    [self.navigationController pushViewController:growingUpFilesPictures animated:YES];
//    
//    [growingUpFilesPictures release];
}
@end
